<?php
//No direct access
defined('_JEXEC') or die('Restricted access');
?>
<div id="ownservices">
 <div id="mainmenuownservice"><?php echo MenuHelper::nav(); ?></div>
	<div id="mainownservice">
		<h3>
			<?php  echo JText::_('OWNSERVICE_CHANGEPASSWORD'); ?>
		</h3>
		<hr />
		<script language="javascript" type="text/javascript">
			<!--
				function submitbutton(pressbutton)
				{
					var form = document.adminForm;
					if (form.password.value == ""){
						alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_INPUT_PASSWORD', true ); ?>" );
					} else if(form.password2.value == "") {
						alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_INPUT_REPEAT_PASSWORD', true ); ?>" );
					} else if(form.secret.value == "") {
						alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_INPUT_SECRET_CODE', true ); ?>" );
					} else {
						submitform( pressbutton );
					}
				}
			//-->
		</script>
		<form action="<?php echo JRoute::_('index.php?option=com_ownservice'); ?>" method="post" name="adminForm" autocomplete="off">
			<table class="admintable">
					<tr>
						<td class="key"><?php echo JText::_('OWNSERVICE_PASSWORD'); ?> <span class="red">*</span></td>
						<td>
							<input type="password" name="password" value="" class="inputbox" size="50" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo JText::_('OWNSERVICE_REPEAT_PASSWORD'); ?> <span class="red">*</span></td>
						<td>
							<input type="password" name="password2" value="" class="inputbox" size="50" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo JText::_('OWNSERVICE_SECRET'); ?> <span class="red">*</span></td>
						<td>
							<input type="text" name="secret" id="secret" value="<?php echo $row->secret; ?>" class="inputbox" size="10" maxlength="4" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center"><hr /></td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="button" name="save" value="<?php echo JText::_('OWNSERVICE_SAVE'); ?>" onClick="javascript: submitbutton('changepassword_save')" />
						</td>
					</tr>
			</table>
			<input type="hidden" name="option" value="com_ownservice" />
			<input type="hidden" name="task" value="changepassword_save" />
			<input type="hidden" name="Itemid" value="<?php echo JRequest::getVar('Itemid'); ?>" />
			<input type="hidden" name="controller" value="ownservice" />
			<input type="hidden" name="view" value="ownservice" />
			<?php echo JHTML::_( 'form.token' ); ?>
		</form>
	</div>
</div>